﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BiffenService.Model;
using BiffenService.Db;

namespace BiffenService.Control
{
    public class MovieControl
    {
        private static IMovieDb dbMovie = new MovieDb();

        public static Movie GetMovie()
        {
            return GetMovie();
        }

        public static Movie GetMovie(int id)
        {
            return dbMovie.GetMovie(id);
        }

        public static List<Movie> GetAllMovies()
        {
            return dbMovie.GetAllMovies();
        }

        public static int AddMovie(Movie m)
        {
            return dbMovie.AddMovie(m);
        }

        public static int EditMovie(Movie m)
        {
            return dbMovie.EditMovie(m);
        }

        public static int DeleteMovie(int id)
        {
            return dbMovie.DeleteMovie(id);
        }

        public static List<Movie> GetCurrentMovies()
        {
            return dbMovie.GetCurrentMovies();
        }

        public static List<Movie> SearchMovies(ICollection<string> searchParams, string queryString)
        {
            return dbMovie.SearchMovies(searchParams, queryString);
        }
    }
}
